{% extends "templates/base.html" %}

{% block title%}Browse Ride Requests{% endblock %}

{% block main %}
<h2>browse ride requests</h2>
<p>
This is a list of requests for rides that other users would like to take. By accepting their request
and creating a ride, the requesting user will be automatically notified.
</p>
{% if riderequests %}

	<table class="roadmate-list">
		{% for riderequest in riderequests %}

   <tr class="list-item">
				    <tr class="list-row">
				    	<th rowspan="2" class="list-header"></th>
                        <td>{{riderequest.date|date_for_table }}</td>
		 				<td> {{riderequest.owner.get_name_tag}} </td>
					</tr>
				    <tr class="list-row">
					    <td colspan="2"><strong><a href="/riderequest?id={{ riderequest.key.id }}">{{ riderequest.get_name }}</strong></a>
						</td>
					</tr>
			</tr> <!-- end list item -->
		{% endfor %}

	</table>
{% else %}
   <h3>Sorry, there are currently no ride requests available.</h3>
   <p>Why not <a href="/ride_create">offer a ride</a> of your own?</p>
{% endif %}




{% endblock %}

